﻿using FlickrNet;
using Lsk.Business;
using Lsk.Business.DTO;
using Lsk.Data;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;

namespace lsk.Web.Api
{
    public class BuyRentController : ApiController
    {
        [HttpPost]
        public HttpResponseMessage save(dynamic data)
        {
            BuyRentParameter entry = JsonConvert.DeserializeObject<BuyRentParameter>(data.ToString());
            UserSubmitInfo usi = new UserSubmitInfo();
            IEnumerable<String> retval =  usi.SaveBuyRent(entry);
            return Request.CreateResponse(HttpStatusCode.OK, retval);   // if success, return the id.
        }    
     }
}
